home *** CD-ROM | disk | FTP | other *** search
- -- Sound Play Member
-
- -- also functions through lingo by handling message 'initPlayMember',
- -- for example if this behavior was assigned to sprite 5, use
- -- sendsprite 5, #initPlayMember
-
- -- Media
- property WhichEvent, WhichSound, WhichChannel, StartImmediately
- property tester
-
- on initPlayMember me
- init me
- end
-
-
- on mouseUp me
- if whichEvent = #mouseup then init me
- end
-
- on mouseDown me
- if whichEvent = #mousedown then init me
- end
-
- on prepareFrame me
- if whichEvent = #prepareframe then init me
- end
-
- on enterFrame me
- if whichEvent = #enterframe then init me
- end
-
- on exitFrame me
- if whichEvent = #exitframe then init me
- end
-
- on init me
- puppetSound the WhichChannel of me, the whichSound of me
- if the StartImmediately of me then updatestage
- end
-
- ---
-
- on getPropertyDescriptionList
-
- set p_list = [ ¬
- #WhichSound: [ #comment: "Sound:", ¬
- #format: #sound, ¬
- #default: "" ], ¬
- #WhichChannel: [ #comment: "Channel:", ¬
- #format: #integer, ¬
- #default: 1 ], ¬
- #WhichEvent: [ #comment: "Initializing Event:", ¬
- #format: #symbol, ¬
- #range: [ #MouseUp, #MouseDown, #PrepareFrame, #EnterFrame, #ExitFrame, #InitPlayMember ], ¬
- #default: #MouseUp ]¬
- ]
- return p_list
-
- end
-
- on getBehaviorDescription
- return ¬
- "Plays the designated sound cast member when the specified event occurs, or when the message ." & RETURN & ¬
- "PARAMETERS:" & RETURN & ¬
- "• Sound - Choose the sound cast member to be played." & RETURN & ¬
- "• Channel - Enter the sound channel number to be used for playback." & RETURN & ¬
- "ΓÇó Initializing Event - Specify the event that triggers the behavior."
-
- end
-
-